#ifndef REGISTEREDUSERINFORMATION_H
#define REGISTEREDUSERINFORMATION_H

#include <QDialog>
#include <QRegExpValidator>//正则表达式头文件
#include"mainwindow.h"
#include"userMysql.h"
#include "usermysqls.h"
namespace Ui {
class RegisteredUserInformation;
}
struct UserInfo;
class RegisteredUserInformation : public QDialog
{
    Q_OBJECT

public:
    explicit RegisteredUserInformation(QWidget *parent = nullptr);
    ~RegisteredUserInformation();
    //friend MainWindow;
    static RegisteredUserInformation* instance();
    void ClearLineEdit();
private slots:
    void on_pushButton_confirm_clicked();

    void on_pushButton_Cancel_clicked();
    void on_pushButtonHOS_clicked();
    void clearLineEdit();//清空输入输入的信息
signals:
    void RegisterUser();
    void upUserData(const bool ok);
private:
    bool saveUserIformation();//saveUserIformation(UserInfo &user)

    void hidenOrShowPassword(bool key);
    int getAdminCount();
    void displayAdminCount();
    void setQLineEdit();
private:
    Ui::RegisteredUserInformation *ui;
private:
bool status;
//int adminCount;//用来存储管理员账号的个数

};

#endif // REGISTEREDUSERINFORMATION_H
